﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DoAnWeb.BUS;
using DoAnWeb.DAO;
using DoAnWeb.DTO;

namespace DoAnWeb
{
    public partial class History : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (CurrentContext.IsLogged == true)
            {
                TaiKhoanDAO DAO = new TaiKhoanDAO();
                if (DAO.GetKind(CurrentContext.UserName) != "LTK2")
                {
                    Response.Redirect("~/Default.aspx");
                }
                DonHangBUS bus = new DonHangBUS();
                gvListHistory.DataSource = bus.GetList_KhachHang(CurrentContext.UserName);
                gvListHistory.DataBind();

            }
            else
                Response.Redirect("~/Default.aspx");
        }

    }
}